package com.rest.demo.config.properties;

import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.context.annotation.Configuration;

/**
 * @author Administrator
 * @decription cros跨域配置
 * @Date 2017-11-10 15:45
 */
@Configuration
@ConfigurationProperties(prefix = CrosProperties.CROS)
public class CrosProperties {

    public static final String CROS = "cros";

    /**
     * 允许的目标地址
     */
    private String allowOrigin = "*";

    /**
     * 允许的目标方法
     */
    private String allowMethods = "GET,POST,PUT,DELETE,OPTIONS";

    /**
     * 允许的证书
     */
    private String allowCredentials = "true";

    /**
     * 允许的头部
     */
    private String allowHeaders = "Content-Type";

    /**
     * 暴露的头部
     */
    private String exposeHeaders;

    public String getAllowOrigin() {
        return allowOrigin;
    }

    public void setAllowOrigin(String allowOrigin) {
        this.allowOrigin = allowOrigin;
    }

    public String getAllowMethods() {
        return allowMethods;
    }

    public void setAllowMethods(String allowMethods) {
        this.allowMethods = allowMethods;
    }

    public String getAllowCredentials() {
        return allowCredentials;
    }

    public void setAllowCredentials(String allowCredentials) {
        this.allowCredentials = allowCredentials;
    }

    public String getAllowHeaders() {
        return allowHeaders;
    }

    public void setAllowHeaders(String allowHeaders) {
        this.allowHeaders = allowHeaders;
    }

    public String getExposeHeaders() {
        return exposeHeaders;
    }

    public void setExposeHeaders(String exposeHeaders) {
        this.exposeHeaders = exposeHeaders;
    }
}
